
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta charset="utf-8" />
    <title>ambient.add_data &#8212; Texas A&amp;M Oil spill / Outfall Calculator 2.1.0 documentation</title>
    <link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    <script id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
    <script src="../../_static/jquery.js"></script>
    <script src="../../_static/underscore.js"></script>
    <script src="../../_static/doctools.js"></script>
    <script src="../../_static/language_data.js"></script>
    <link rel="index" title="Index" href="../../genindex.html" />
    <link rel="search" title="Search" href="../../search.html" />
    <link rel="next" title="ambient.get_world_ocean" href="ambient.get_world_ocean.html" />
    <link rel="prev" title="ambient.extract_profile" href="ambient.extract_profile.html" />
   
  <link rel="stylesheet" href="../../_static/custom.css" type="text/css" />
  
  
  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />

  </head><body>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          

          <div class="body" role="main">
            
  <div class="section" id="ambient-add-data">
<h1>ambient.add_data<a class="headerlink" href="#ambient-add-data" title="Permalink to this headline">¶</a></h1>
<dl class="function">
<dt id="ambient.add_data">
<code class="sig-prename descclassname">ambient.</code><code class="sig-name descname">add_data</code><span class="sig-paren">(</span><em class="sig-param">data</em>, <em class="sig-param">col</em>, <em class="sig-param">var</em>, <em class="sig-param">new_data</em>, <em class="sig-param">var_symbols</em>, <em class="sig-param">var_units</em>, <em class="sig-param">comments</em>, <em class="sig-param">z_col</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/ambient.html#add_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#ambient.add_data" title="Permalink to this definition">¶</a></dt>
<dd><p>Add data to a <cite>numpy</cite> array</p>
<p>Adds data to a profile data base contained in a <cite>numpy</cite> array.  This 
function is similar to <cite>fill_nc_db()</cite>, but operating on <cite>numpy</cite> arrays
instead of a netCDF dataset.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>data</strong><span class="classifier">ndarray</span></dt><dd><p><cite>Numpy</cite> array of profile data organized by column.  The first column
should be the independent variable (depth), followed sequentially
by the dependent variables (temperature, salinity, pressure and any
included dissolved chemicals).</p>
</dd>
<dt><strong>col</strong><span class="classifier">int</span></dt><dd><p>Number of the column in <cite>data</cite> to be added.</p>
</dd>
<dt><strong>var</strong><span class="classifier">str</span></dt><dd><p>String containing the variable name of the new data to add to the
profile dataset.</p>
</dd>
<dt><strong>new_data</strong><span class="classifier">ndarray</span></dt><dd><p><cite>Numpy</cite> array containing the new data to be added to the current 
dataset.</p>
</dd>
<dt><strong>var_symbols</strong><span class="classifier">list of str</span></dt><dd><p>List of strings containing the variable names of the variables 
in the new_data dataset.</p>
</dd>
<dt><strong>var_units</strong><span class="classifier">list of str</span></dt><dd><p>List of strings containing the units of the variables in the 
new_data dataset.</p>
</dd>
<dt><strong>comments</strong><span class="classifier">str</span></dt><dd><p>String containing comments for the comment attribute of the variable.
For instance, ‘Measured’, ‘Derived quantity’, etc.</p>
</dd>
<dt><strong>z_col</strong><span class="classifier">int, default is 0</span></dt><dd><p>Column number of the column containing the depth data.  The first 
column is numbered zero.</p>
</dd>
</dl>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><dl class="simple">
<dt><strong>data</strong><span class="classifier">ndarray</span></dt><dd><p><cite>Numpy</cite> array of profile data updated with the new variable in 
<cite>new_data</cite>.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

</div>


          </div>
          
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="../../index.html">Texas A&M Oil spill / Outfall Calculator</a></h1>








<h3>Navigation</h3>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="../../user_manual.html">TAMOC User Manual</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../unit_tests.html">Unit Tests</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../glossary.html">Glossary</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../bugs.html">Reporting Bugs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../readme.html">Read Me File</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../release.html">Release Notes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../license.html">License</a></li>
</ul>

<div class="relations">
<h3>Related Topics</h3>
<ul>
  <li><a href="../../index.html">Documentation overview</a><ul>
  <li><a href="../../user_manual.html">TAMOC User Manual</a><ul>
  <li><a href="../../modules/ambient.html">Overview of Ambient Module</a><ul>
      <li>Previous: <a href="ambient.extract_profile.html" title="previous chapter">ambient.extract_profile</a></li>
      <li>Next: <a href="ambient.get_world_ocean.html" title="next chapter">ambient.get_world_ocean</a></li>
  </ul></li>
  </ul></li>
  </ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" />
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script>$('#searchbox').show(0);</script>








        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="footer">
      &copy;2020, Scott A. Socolofsky.
      
      |
      Powered by <a href="http://sphinx-doc.org/">Sphinx 2.4.4</a>
      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
      
      |
      <a href="../../_sources/autodoc/ambient/ambient.add_data.rst.txt"
          rel="nofollow">Page source</a>
    </div>

    

    
  </body>
</html>